<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <style>
            body,td,th { font-family: Arial; font-size: 12px;color: #565656;}
            .login_Infor h2 {
                background:#ececec;
                text-align:left;
                padding:3px 0px 3px 10px;
                font-weight:normal;
}
        </style>
</head>
<body>
<?php
    $months = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
    "Oct", "Nov", "Dec");
    ini_set("date.timezone", "Europe/Paris");
    for ($i = 0; $i < 12; $i++) {
        $dropdown_data[$i + 1] = $months[$i];
    }
    for ($i = 0; $i < 31; $i++) {
        $day_data[$i + 1] = $i + 1;
    }
    for ($i = 2011; $i > 1900; $i--) {
        $year_data[$i] = $i;
    }
    $selected_day = isset($selected_day)?$selected_day:1;
    $selected_month = isset($selected_month)?$selected_month:1;
    $selected_year = isset($selected_year)?$selected_year:2000;
?>

<div id="register_Wrapper" align="center">
    <div id="register">
        <div align="center"><img src="<?php echo  base_url()."assets/css/images/logo.png"?>"/></div>
        <form id="registerForm" name="registerForm" method="post" enctype="multipart/form-data" action="<?php echo site_url('accueil/register') ?>">
            <div class="login_Infor">
                <h2>INFORMATION DU COMPTE</h2>
                <table width="100%">
                    <tr>
                        <td width="300px"><label for="user_name">Identifiant <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="user_name" id="user_name" value="<?php echo set_value('user_name'); ?>"/></td>
                    </tr>
                    <?php if(form_error('user_name')):?>
                    <tr>
                        <td colspan="2" style="color: red;"><?php echo form_error('user_name')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="reg_email">Email <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="reg_email" id="reg_email" value="<?php echo set_value('reg_email'); ?>"/></td>
                    </tr>
                    <?php if(form_error('reg_email')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('reg_email')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="reg_password">Mot de passe <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="password" name="reg_password" id="reg_password"/></td>
                    </tr>
                    <?php if(form_error('reg_password')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('reg_password')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="confirm_password">Confirmation du mot de passe<span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="password" name="confirm_password" id="confirm_password"/></td>
                    </tr>
                    <?php if(form_error('confirm_password')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('confirm_password')?></td>
                    </tr>
                    <?php endif;?>
                </table>
            </div><!--End #login_Infor-->
            <div class="login_Infor">
                <h2>INFORMATION PERSONELLE</h2>
                <table width="100%">
                    <tr>
                        <td width="300px"><label for="gavatar">Image profile</label></td>
                        <td><input name="userfile" id="userfile" type="file" size="25"/></td>
                    </tr>
                    <tr>
                        <td><label for="first_name">Nom<span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="first_name" id="first_name" value="<?php echo set_value('first_name'); ?>"/></td>
                    </tr>
                    <?php if(form_error('first_name')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('first_name')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="last_name">Prénom <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="last_name" id="last_name" value="<?php echo set_value('last_name'); ?>"/></td>
                    </tr>
                    <?php if(form_error('last_name')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('last_name')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="display_name">Nom d'affichage <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="display_name" id="display_name" value="<?php echo set_value('display_name'); ?>"/></td>
                    </tr>
                    <?php if(form_error('display_name')):?>
                    <tr>
                         <td colspan="2" style="color: red;"><?php echo form_error('display_name')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="company">Entreprise</label></td>
                        <td><input type="text" name="company" id="company" value="<?php echo set_value('company'); ?>"/></td>
                    </tr>
                    <tr>
                        <td><label for="dob">Date de naissance</label></td>
                        <td colspan="2">
                            J : <?php echo form_dropdown('birth_date', $day_data, $selected_day, 'id="day"'); ?>
                            M : <?php echo form_dropdown('birth_month', $dropdown_data,$selected_month, 'id="month"'); ?>
                            A : <?php echo form_dropdown('birth_year', $year_data,$selected_year, 'id="year"'); ?>
                        </td>
                    </tr>
                    <?php if($date_error):?>
                        <tr>
                            <td colspan="2" style="color: red;"><?php echo $date_error?></td>
                        </tr> 
                    <?php endif;?>
                    <tr>
                        <td><label for="gender">Sexe</label></td>
                        <td colspan="2">
                            <?php
                                $male = array(
                                'name' => 'gender',
                                'id' => 'rad_male',
                                'value' => 'm',
                                'checked' => TRUE,
                                'style' => 'margin:10px',
                                );
                                $female = array(
                                'name' => 'gender',
                                'id' => 'rad_female',
                                'value' => 'f',
                                'checked' => TRUE,
                                'style' => 'margin:10px',
                                );

                                echo 'Masculin' . form_radio($male);
                                echo 'Féminin' . form_radio($female, 'Female');
                            ?>
                        </td>
                    </tr>
                    <tr>
                        <td><label for="phone">Téléphone <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="phone" id="phone" value="<?php echo set_value('phone'); ?>"/></td>
                    </tr>
                    <?php if(form_error('phone')):?>
                    <tr>
                         <td colspan="2" style="color: red"><?php echo form_error('phone')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="mobile">Mobile <span style="color: red;font-weight: bolder">*</span></label></td>
                        <td><input type="text" name="mobile" id="mobile" value="<?php echo set_value('mobile'); ?>"/></td>
                    </tr>
                    <?php if(form_error('mobile')):?>
                    <tr>
                         <td colspan="2" style="color: red"><?php echo form_error('mobile')?></td>
                    </tr>
                    <?php endif;?>
                    <tr>
                        <td><label for="address">Adresse</label></td>
                        <td><input type="text" name="address" id="address" value="<?php echo set_value('address'); ?>"/></td>
                    </tr>
                    <tr valign="top">
                        <td rowspan="2"><label for="address"></label><br/><?php echo $captcha_img;?></td>
                        <td><input type="text" name="captcha" size="20" style="margin-top: 20px;"/></td>
                    </tr>
                    <tr><td><?php echo form_error('captcha') ?></td></tr>
                    <tr>
                        <td></td><td colspan="2" style="color: red"><input type="submit" name="register" id="register" value="Enregistrer"/></td>
                    </tr>
                </table>

            </div><!--End #login_Infor-->
        </form>
    </div><!--End $register-->
</div><!--End #register_Wrapper-->
</body>
</html>
